/* 后台管理样式 */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}

/* 侧边栏 */
.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #34495e;
    text-align: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item a span:first-child {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.nav-item a:hover {
    background: #34495e;
    color: white;
}

.nav-item.active a {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

/* 主内容区 */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.sidebar-toggle:hover {
    background: #f5f5f5;
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    color: #e74c3c;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #ffeaea;
}

/* 内容区域 */
.admin-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.stat-number {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

/* 内容区块 */
.content-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.section-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 状态标签 */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.published {
    background: #e8f5e8;
    color: #2e7d32;
}

.status.draft {
    background: #fff3e0;
    color: #ef6c00;
}

/* 按钮样式 */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 6px;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    margin-bottom: 0.5rem;
}

.comment-header strong {
    color: #333;
}

.comment-header a {
    color: #3498db;
    text-decoration: none;
}

.comment-text {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.comment-time {
    font-size: 0.8rem;
    color: #999;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s;
    }

    .admin-sidebar.show {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }
}